package com.stu.httpclient;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

public class Test1 {
   public static void main(String[] args) {
	  try {
		String strUrl="http://localhost:8080/wriss";
		URL url=new URL(strUrl);
		InputStream is=url.openStream();
		BufferedReader br=new BufferedReader(new InputStreamReader(is, "UTF-8"));
		String line=null;
		while((line=br.readLine())!=null){
			System.out.println(line);
		}
		is.close();
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
   }
}
